package thread;

public class ThreadInfoDemo {
    public static void main(String[] args) {
        Thread main = Thread.currentThread();
        String name = main.getName();
        System.out.println("线程的名字:" + name);
        long id = main.getId();
        System.out.println("id:" + id);
        int priority = main.getPriority();
        System.out.println("线程优先级:" + priority);
        boolean isAlive = main.isAlive();
        boolean isDaemon = main.isDaemon();
        boolean isInterrupted = main.isInterrupted();
        System.out.println("isAlive:" + isAlive);
        System.out.println("isDaemon:" + isDaemon);
        System.out.println("isInterrupted:" + isInterrupted);
    }
}